package com.bawei.yangzongcai___day2.MaiDongFangQi.day15.MMVVPP.V;

import android.os.Bundle;
import android.widget.Toast;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.bawei.yangzongcai___day2.MaiDongFangQi.day15.MMVVPP.P.mmvvppPretenter;

/**
 * create by ertu
 * create on 2021/8/2
 * description
 */
public abstract class BasemmvvppActivity<P extends mmvvppPretenter> extends AppCompatActivity implements mmvvppActivity,mmvvppView {
    protected  P psadas;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(bandlayoutmmvvpp());
        initmmvvppView();
        initmmvvppDate();
    }

    @Override
    public void showmmvvpp() {

    }

    @Override
    public void haidmmvvpp() {

    }

    @Override
    public void tostmmvvpp(String tosd) {
        Toast.makeText(this,tosd,Toast.LENGTH_SHORT).show();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        if (psadas!=null)
        {
            psadas=null;
            psadas.dismmvvppPretenter();
        }
    }
}
